package com.koron.css2.serviceManage.service;

import com.koron.css2.serviceManage.bean.TServiceLog;
import com.koron.css2.serviceManage.mapper.TServiceLogMapper;
import org.bson.types.ObjectId;
import org.koron.ebs.mybatis.SessionFactory;
import org.koron.ebs.mybatis.TaskAnnotation;
import org.springframework.stereotype.Service;

@Service
public class ServiceLogService {

	@TaskAnnotation("addLog")
	public int addLog(SessionFactory sf, TServiceLog log) {
		TServiceLogMapper mapper = sf.getMapper(TServiceLogMapper.class);
		log.setLogId(new ObjectId().toHexString());
		return mapper.insert(log);
	}

}
